<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    var obj = {
        name:"damu",
        age:18,
        wife:{
            name:"zdy",
            son:{
                name:"laofu"
            }
        }
    }

    //冻结对象
    Object.freeze(obj)

    obj.wife={}
    console.log(obj);
</script>
</html>